package com.ruoyi.common.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;

/**
 * 全局异常
 *
 * @author ruoyi
 */
@SuppressWarnings("unused")
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
public class GlobalException extends RuntimeException {
	@Serial
	private static final long serialVersionUID = 1L;

	/**
	 * 错误提示
	 */
	private String message;

	/** 错误明细，内部调试错误 */
	private String detailMessage;

	/**
	 * 空构造方法，避免反序列化问题
	 */
	public GlobalException() {
	}

	public GlobalException(String message) {
		this.message = message;
	}
}